/**
 * createor: zc
 * email: zc8023zs@163.com
 * create_time: 2020/3/14 13:46:24
 */
import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/system/sysmenu/getSysMenuList',
    method: 'post',
    params: query
  })
}

export function createObj(data) {
  return request({
    url: '/system/sysmenu/addSysMenu',
    method: 'post',
    params:data
  })
}

export function updateObj(data) {
  return request({
    url: '/system/sysmenu/updateSysMenu',
    method: 'post',
    params: data
  })
}

export function deleteObj(data) {
  return request({
    url: '/system/sysmenu/deleteSysMenu',
    method: 'post',
    params:{id:data.id}
  })
}

export function currentmenu(){
  return request({
    url: '/system/sysmenu/UserMenuTree',
    method: 'post'
  })

}


export function currentmenupers(data){
  return request({
    url: '/system/sysmenu/UserMenuPers',
    method: 'post',
    data
  })

}